﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="BookOfDis.aspx.cs" Inherits="MyHospital.web.BookOfDis" EnableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="Styles/book.css" rel="stylesheet" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script lang="javascript" type="text/javascript" src="My97DatePicker/WdatePicker.js"></script>
    <div class="depart">
    <input id="inp1" class="inp1" type="text" value="请输入疾病" runat="server" /> <asp:Button ID="Button1" runat="server" Text="搜索" OnClick="Button1_Click" />
    <input id="inp2" class="inp2" type="text" value="请选择就诊日期" runat="server" onclick="WdatePicker({dateFmt:'yyyy-MM-dd', minDate:'%y-%M-%d', maxDate:'%y-%M-{%d+6}'})" />
   <!-- <asp:TextBox ID="TextBox2" runat="server" Text="请选择就诊日期" onclick="WdatePicker({dateFmt:'yyyy-MM-dd', minDate:'%y-%M-%d', maxDate:'%y-%M-{%d+6}'})"></asp:TextBox>-->
    <asp:GridView Width="355px"  ID="GridView1" runat="server" OnPageIndexChanging="GridView1_PageIndexChanging" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" PageSize="16" OnSelectedIndexChanged="GridView1_SelectedIndexChanged">
        <Columns>
            <asp:BoundField DataField="disName" HeaderText="疾病名称" SortExpression="disName" />
            <asp:TemplateField>   
           <ItemTemplate>   
                   <asp:Button    ID="Button1"    runat="server"    OnClick="Button2_Click"   Text="查看"    />   
           </ItemTemplate>   
   </asp:TemplateField>   
        </Columns>
    </asp:GridView>
    </div>

    <script>
        var input = document.querySelector('.inp1'); 
        var input1 = document.querySelector('.inp2');
        input.onfocus = function () {
            if (this.value == '请输入疾病') {
                this.value = '';
            }
        }
        input.onblur = function () {
            if (this.value == '') {
                this.value = "请输入疾病"
            }
        }
        input1.onfocus = function () {
            if (this.value == '请选择就诊日期') {
                this.value = '';
            }
        }
        input1.onblur = function () {
            if (this.value == '') {
                this.value = "请选择就诊日期"
            }
        }
    </script>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <div class="doc">
    <asp:DataList ID="DataList1" runat="server" RepeatColumns="7" RepeatDirection="Horizontal" Width="104px">
        <ItemTemplate>
            <div class="item">
            <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl='<%# Eval("image") %>' OnCommand="ImageButton1_Command1" CommandArgument='<%# Eval("doctorId") %>' />
            <br />
            <asp:Label ID="Label1" runat="server" Text='<%# Eval("doctorName") %>' ></asp:Label>
            <br />
            <asp:Label ID="Label2" runat="server" Text='<%# Eval("job") %>' ></asp:Label>
            <br />
            <asp:Label ID="Label3" runat="server" Text="——————"></asp:Label>
            <br />
            <asp:Label ID="Label4" runat="server" Text='<%# Eval("introduce") %>' ></asp:Label>
           </div>
        </ItemTemplate>
    </asp:DataList>
   </div>
</asp:Content>
